// index.js
const api= require("../../api/index")
Page({
  // 放数据
  data: {
    cdList:[

    ],
    homeTitle:""
  },
  onLoad: function () {
    wx.request({
      url: 'http://192.168.0.14/site/getSiteInfo', // 替换为你的 API 地址
      success:(data)=>{
        console.log(data.data.data); 
        this.setData({
          cdList:data.data.data
        });
      }
    })
    
  },
  onShow(){
    console.log("你好");
    wx.vibrateLong();
    wx.request({
      url: 'http://192.168.0.14/config/getValue?system_key=home_title',
      success:(data)=>{
        this.setData({
          homeTitle:data.data.data[0].system_value
        });
      }
    })
  },
  custom(){
    wx.openCustomerServiceChat({
      corpId: 'corpId',
      extInfo: {
        url: 'url',
      },
    })
    
  },
  jumpTo(){
    wx.navigateTo({
      url: '/secondary_page/details_page/details_page',
    })
  },
  onReady(){
    api.getMsg().then(data=>
      console.log(data)
      )
  }
})
